package com.deep.deepenterpise.dao;

import com.deep.deepenterpise.model.entity.DrCheckHistory;
import com.deep.deepenterpise.model.to.gas.DrAddCheckHistoryTo;
import com.deep.deepenterpise.model.to.unit.DrCheckPageTo;
import com.deep.deepenterpise.model.vo.unit.DrCheckVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * @author xyz
 * @description 针对表【dr_check_history(DR历史检查)】的数据库操作Mapper
 * @createDate 2024-05-16 13:58:40
 * @Entity com.deep.deepenterpise.model.entity.DrCheckHistory
 */
public interface DrCheckHistoryMapper {
    List<DrAddCheckHistoryTo> findCheckBottleByDrUnitKeyAndDrIdIsMoreThanAndDrTypeNot(@Param("drUnitKey") String drUnitKey,
                                                                                      @Param("drId") Integer drId,
                                                                                      @Param("drType") Integer drType);

    List<DrAddCheckHistoryTo> findCheckHouseByDrUnitKeyAndDrIdIsMoreThanAndDrType(@Param("drUnitKey") String drUnitKey,
                                                                                  @Param("drId") Integer drId,
                                                                                  @Param("drType") Integer drType);

    Long countByDrOrderNum(@Param("drOrderNum") String drOrderNum);

    void insert(DrCheckHistory drCheckHistory);

    List<DrCheckVo> findByDrType(Integer drType);

    List<DrCheckVo> findByPage(RowBounds rowBounds, DrCheckPageTo drCheckPageTo);

    Long countByPage(DrCheckPageTo drCheckPageTo);
}




